<?php

$id_user = $_SESSION['id'];
$r1 = bdd_query("SELECT id_article,title,text,link_img,link_vid,date FROM articles WHERE id_user=$id");
?>
<ul>
<?php
	if (mysql_num_rows($r1) == 0)
		echo 'No Article yet !<a href="#dialog" name="modal">Create a new Article</a>';
	else
		while ($row1 = mysql_fetch_row($r1))
			{
				$id_article = $row1[0];
				$date = date('d/m/Y', strtotime($row1[5]));
				$content = "<li><div class='box article'>";
				$content .= "<div class='head'><p class='title'>$row1[1]</p>";
				$content .= "<p class='date'>$date</p></div><br/>";
				$content .= "<div class='content'>";
				//add photo vid ?
				$content .= $row1[2];
				$content .= "</div></li>";
				echo $content;
				include "comments.php";
			}
?>
</ul>
